import { Button } from "antd";
import DeleteIcon from "@/assets/icons/delete.svg?jsx";
import EditIcon from "@/assets/icons/edit.svg?jsx";

type ChunkItemProps = {
  chunk: any;
  onEdit: (chunk: any) => void;
};

export default function ChunkItem(props: ChunkItemProps) {
  const { chunk, onEdit } = props;
  return (
    <div className="break-words rounded-lg border p-2 text-sm [&:not(:first-child)]:mt-4">
      <p>asdasdasdasdasdasd</p>
      <div className="flex justify-end">
        <Button type="text" onClick={() => onEdit(chunk)}>
          <EditIcon />
        </Button>
        <Button type="text">
          <DeleteIcon />
        </Button>
      </div>
    </div>
  );
}
